#include "Background.h"


Background::Background(	SceneManager* mScnMgr ) { 
	
	    
		// Create background rectangle covering the whole screen
		Rectangle2D* rect = new Rectangle2D(true);
		rect->setCorners(-1.0, 1.0, 1.0, -1.0);
		rect->setMaterial("cielo");

		// Render the background before everything else
		rect->setRenderQueueGroup(RENDER_QUEUE_BACKGROUND);
		rect->setBoundingBox(AxisAlignedBox(-100000.0*Vector3::UNIT_SCALE, 100000.0*Vector3::UNIT_SCALE));

		// Attach background to the scene
		SceneNode* node = mScnMgr->getRootSceneNode()->createChildSceneNode("Background");
		node->attachObject(rect);

		
};